package com.eco.fanliapp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.eco.fanliapp.entity.MenuInfo;
import com.eco.fanliapp.service.IMenuInfoService;
import com.eco.fanliapp.utils.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 菜单 服务层实现
 * 
 * @author xiaoxx
 * @date 2019-05-20
 */
@Service("menuInfoServiceImpl")
public class MenuInfoServiceImpl extends ServiceImpl<com.eco.fanliapp.dao.MenuInfoMapper, MenuInfo> implements IMenuInfoService
{
	@Autowired
	private com.eco.fanliapp.dao.MenuInfoMapper MenuInfoMapper;

	/**
     * 查询菜单信息
     * 
     * @param id 菜单ID
     * @return 菜单信息
     */
    @Override
	public MenuInfo selectMenuInfoById(Integer id)
	{
	    return MenuInfoMapper.selectMenuInfoById(id);
	}
	
	/**
     * 查询菜单列表
     * 
     * @param MenuInfo 菜单信息
     * @return 菜单集合
     */
	@Override
	public List<MenuInfo> selectMenuInfoList(MenuInfo MenuInfo)
	{
	    return MenuInfoMapper.selectMenuInfoList(MenuInfo);
	}

	@Override
	public List<MenuInfo> selectMenuInfoByIds(List<Integer> ids) {
		return MenuInfoMapper.selectMenuInfoByIds(ids);
	}

	/**
     * 新增菜单
     * 
     * @param MenuInfo 菜单信息
     * @return 结果
     */
	@Override
	public int insertMenuInfo(MenuInfo MenuInfo)
	{
	    return MenuInfoMapper.insertMenuInfo(MenuInfo);
	}
	
	/**
     * 修改菜单
     * 
     * @param MenuInfo 菜单信息
     * @return 结果
     */
	@Override
	public int updateMenuInfo(MenuInfo MenuInfo)
	{
	    return MenuInfoMapper.updateMenuInfo(MenuInfo);
	}

	/**
     * 删除菜单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteMenuInfoByIds(String ids)
	{
		return MenuInfoMapper.deleteMenuInfoByIds(Convert.toStrArray(ids));
	}
	
}
